#pragma once
#include "preCmpH.h"
#define WIN32_LEAN_AND_MEAN
#include<Windows.h>

BEGIN_NAMESPACE(ui_manager)
BEGIN_NAMESPACE(ui_events)

class UITimer{
public:
	UITimer();
	static void Start();
	static __int64 SecondsToCycles(float seconds);
	static double CyclesToSeconds(__int64 cycles_);
	void Update(__int64 realTime);
	void Reset();
	void setInterval(int miliseconds);
	__int64 GetTimeCycles()const{return cycles.QuadPart;}
	int getInterval(){return interval;}
	bool hasTicked()const{return ticked;}
private:
	static LARGE_INTEGER cyclesPerSecond;
	LARGE_INTEGER cycles;
	int interval;
	bool ticked;
};

END_NAMESPACE
END_NAMESPACE